
import java.util.Scanner;

public class Su {
    public static void sign( ){
        int count = 3;
        Scanner sc = new Scanner(System.in);

        while(count != 0){
            System.out.println("请输入你的密码: ");
            String pw = sc.nextLine();
            if(pw.equals("123456")){
                System.out.println("登录成功");
                break;
            }else{

                System.out.println("登录失败，请重新输入密码 :");
                count--;
            }
        }
        if(count==0){
            System.out.println("登录失败！");
            System.out.println("请退出系统 ！");
        }
    }
    public static void main(String[] args) {
        sign( );
    }
}
